package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ISignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 签到记录表 前端控制器
 * </p>
 *
 * @author XinxuanZhuo
 * @since 2024-03-07
 */

@Api(tags = "签到相关接口")
@RestController
@RequestMapping("sign-records")
@RequiredArgsConstructor
public class SignRecordController {


    private final ISignRecordService signRecordService;

    /**
     * 用户签到 TODO 前端没实现
     */
    @PostMapping
    @ApiOperation("签到功能接口")
    public SignResultVO addSignRecords(){
        return signRecordService.addSignRecords();
    }

    /**
     * 查询签到记录
     */
    @GetMapping
    @ApiOperation("查询签到记录")
    public List<Integer> querySignRecords(){
        return signRecordService.querySignRecords();
    }

}
